package com.example.entity;

import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.stereotype.Repository;

import java.io.Serializable;

@Data
@NoArgsConstructor
@Accessors(chain = true) //链式写法
public class Dept implements Serializable {//Dept 实体类，orm类表关系映射
    private long deptno;
    private String dname;
    //保存的数据库的表名
    private String db_source;

    public Dept(String dname) {
        this.dname = dname;
    }
    /**
     * 链式写法
     * Dept dept = new Dept();
     * dept.setDeptno().setDname();
     */
}
